<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <head>
        <title>TODO supply a title</title>
    </head>
    <h:body>
        <ui:composition template="/resources/template/myTemplate.xhtml">

            <ui:define name="content">              
                <h:form>
                    <h3> Register new User</h3>
                    <h:panelGrid columns="2">
                        <h:outputLabel value="Name : "/>
                        <h:inputText value="#{userManagedBean.user.name}" required="true"/>

                        <h:outputLabel value="Surname : "/>
                        <h:inputText value="#{userManagedBean.user.surName}" required="true"/>

                        <h:outputLabel value="Email : "/>
                        <h:inputText value="#{userManagedBean.user.email}" required="true"
                                     validator="com.bionic.ce.validators.NewUserValidator"/>

                        <h:outputLabel value="Password : "/>
                        <h:inputText value="#{userManagedBean.user.password}" required="true"/>

                        <h:outputLabel value="Adress : "/>
                        <h:inputText value="#{userManagedBean.user.adress}"/>

                        <h:outputLabel value="Telephone : "/>
                        <h:inputText value="#{userManagedBean.user.telephone}" required="true"/>

                        <p:commandButton value="Register" action="#{userManagedBean.doCreateUser()}"/>
                    </h:panelGrid>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>